/**
 * Anderground project - Subway maps processor application.
 * Copyright (C) 2008 Maksim Tkatchenko
 * Copyright (C) 2008-2009 Eldar Abusalimov, Ilya Shurigyn
 * 
 * This file is part of Anderground.
 * 
 * Anderground is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * Anderground is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Anderground.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.anderground.core.graphics;

import org.anderground.core.graphics.factories.RectFactory;
import org.anderground.internal.graphics.abstaractions.AbstractRect;
import org.anderground.internal.graphics.abstaractions.Delegator;

public class Rect extends Delegator<AbstractRect> implements AbstractRect {

	public Rect() {
		setDelegate(RectFactory.getFactory().create());
	}

	public Rect(int left, int top, int right, int bottom) {
		setDelegate(RectFactory.getFactory().create(left, top, right, bottom));
	}

	public Rect(Rect rect) {
		setDelegate(RectFactory.getFactory().create(rect));
	}

	public boolean contains(int x, int y) {
		return getDelegate().contains(x, y);
	}

	public boolean contains(Rect r) {
		return getDelegate().contains(r);
	}

	public int getBottom() {
		return getDelegate().getBottom();
	}

	public int getLeft() {
		return getDelegate().getLeft();
	}

	public int getRight() {
		return getDelegate().getRight();
	}

	public int getTop() {
		return getDelegate().getTop();
	}

	public int height() {
		return getDelegate().height();
	}

	public void setBottom(int bottom) {
		getDelegate().setBottom(bottom);
	}

	public boolean setIntersect(Rect a, Rect b) {
		return getDelegate().setIntersect(a, b);
	}

	public void setLeft(int left) {
		getDelegate().setLeft(left);
	}

	public void setRight(int right) {
		getDelegate().setRight(right);
	}

	public void setTop(int top) {
		getDelegate().setTop(top);
	}

	public int width() {
		return getDelegate().width();
	}

	public void set(Rect rect) {
		getDelegate().set(rect);
	}

	public void set(int left, int top, int right, int bottom) {
		getDelegate().set(left, top, right, bottom);
	}

}
